home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '90 / MacHack'90 Proceedings / John Norstad / Reusable Code / Source / glob.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-10  |  3.6 KB  |  81 lines  |  [TEXT/MPS ]

  1. /*______________________________________________________________________
  2.  
  3.     glob.c - Disinfectant Globals.
  4.     
  5.     Copyright © 1988, 1989, 1990 Northwestern University.  Permission is 
  6.     granted to use this code in your own projects, provided you give credit 
  7.     to both John Norstad and Northwestern University in your about box or 
  8.     document.
  9.  
  10.     This module declares the global variables used by the private
  11.     modules in Disinfectant.
  12. _____________________________________________________________________*/
  13.  
  14.  
  15. #pragma load "precompile"
  16. #include "rez.h"
  17. #include "glob.h"
  18.  
  19. /*______________________________________________________________________
  20.  
  21.     Global Variables.
  22. _____________________________________________________________________*/
  23.  
  24.  
  25. /* The following variables are set during initialization, and never
  26.     changed thereafter. */
  27.  
  28. ControlHandle    Controls[numControls];    /* main window control handles */
  29. Handle            Report;                    /* handle to main window report record */
  30. Rect                DragRect;                /* drag rectangle */
  31. Boolean            SysHasShutDown;        /* true if shutdown trap exists */
  32. long                LongSleep;                /* long sleep time */
  33. Rect                RectList[numRects];    /* rectangle list */
  34. CursHandle        Watch;                    /* handle to watch cursor */
  35. CursHandle        BBCursors[numBalls];    /* handles to beachball cursors */
  36. CursHandle        HelpCurs;                /* handle to help cursor */
  37. CursHandle        FloppyCurs;                /* handle to floppy disk cursor */
  38. short                SysRefNum;                /* system file ref num */
  39. short                SysVol;                    /* system vol ref num */
  40. long                SysDirID;                /* blessed folder dir id */
  41. short                DfectRefNum;            /* Disinfectant's file ref num */
  42. short                DfectVol;                /* Disinfectant's vol ref num */
  43. Boolean            OldRom;                    /* true if 64K rom */
  44.  
  45. /*    The following variables are changed after intialization. */
  46.  
  47. PrefsType        Prefs;                    /* preferences */                                                        
  48. Boolean            Done = false;            /* true when time to quit */
  49. Boolean            MenuPick;                /* true if command was via menu pick */
  50. Boolean            Scanning = false;        /* true while scan in progress */
  51. Boolean            FloppyWait = false;    /* true while waiting for floppy insert */
  52. Boolean            Canceled;                /* true if scan canceled */
  53. Boolean            RepInfected = false;    /* true if current report contains a 
  54.                                                     message about an infected file */
  55. Boolean            SysInfect = false;     /* true if at least one file in the currently 
  56.                                                     active system folder was infected on a 
  57.                                                     disinfection run */
  58. Boolean            HelpMode = false;        /* true if help mode (shift key down */
  59. Boolean            InForeground = true;    /* true if running in foreground */                                                                
  60. Boolean            NoMemFullAlert = false;    /* true to tell grow zone proc to return 0
  61.                                                         on mem full instead of posting mem full
  62.                                                         alert */
  63. Boolean            DisableDisinfect = false;    /* true to disable Disinfect button */
  64. short                CurScanKind;            /* kind of scan */
  65. long                NumScanned = 0;        /* number of files scanned counter */
  66. long                NumInfected = 0;        /* number of files infected counter */
  67. long                NumErrors = 0;            /* number of errors counter */
  68. Boolean            Notified = false;        /* true if notification posted */
  69. NMRec                NotifRec;                /* Notification Manager record */
  70. Str255            NotifString;            /* notification string */
  71. Boolean            BBEnabled;                /* true if spinning beachball is enabled */
  72. long                TotFiles;                /* total number of files scanned */
  73. long                TotErrors;                /* total number of errors */
  74. long                TotInfected;            /* total number of infected files */
  75. long                TotNoAccess;            /* total number of folders with 
  76.                                                     insufficient access rights */                                            
  77. unsigned long    EarliestDate;            /* date/time of earliest infection */
  78. Str255            EarliestName;            /* name of earliest infected file */
  79. Boolean            SysInfected;            /* true if infected file found
  80.                                                     in blessed folder */
  81.